package com.example.messagemodule.entity;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.hyphenate.chat.EMMessage;

import java.util.List;

public class HbasePatientImManagerEntity {


    /**
     * result : true
     * msg : null
     * data : [{"msgId":"862142542299267208","fromAccount":"user_hospital_117275227127809","toAccount":"doctor_266","msgType":"custom","chargesListId":5801,"sendTime":"2021-04-13 15:13:23","content":null,"fileUrl":null,"customEvent":"chargesList","customExt":"[{\"patientName\":\"香蕉\"},{\"inquiringPatientId\":\"73\"},{\"gender\":\"男\"},{\"createTime\":\"2021-04-13 15:13:22\"},{\"chiefComplaint\":\"明科夫斯基-消法尔综合征[Minkowski-Chauffard综合征],肾上腺脑白质营养不良[Addison-Schilder综合征]\"},{\"chargesListId\":\"5801\"},{\"age\":\"10岁\"}]","attach":"{\"customExts\":[{\"patientName\":\"香蕉\"},{\"inquiringPatientId\":\"73\"},{\"gender\":\"男\"},{\"createTime\":\"2021-04-13 15:13:22\"},{\"chiefComplaint\":\"明科夫斯基-消法尔综合征[Minkowski-Chauffard综合征],肾上腺脑白质营养不良[Addison-Schilder综合征]\"},{\"chargesListId\":\"5801\"},{\"age\":\"10岁\"}],\"customEvent\":\"chargesList\",\"type\":\"custom\"}","ext":"{\"inquiringPatientId\":73,\"chargesListId\":5801,\"patientId\":117275227127809,\"doctorId\":266,\"extType\":\"charges\"}"},{"msgId":"862142980855695124","fromAccount":"doctor_266","toAccount":"user_hospital_117275227127809","msgType":"custom","chargesListId":5801,"sendTime":"2021-04-13 15:15:05","content":null,"fileUrl":null,"customEvent":"received","customExt":"[{\"visitTime\":\"1618298105000\"},{\"status\":\"2\"},{\"relevantDate\":\"\"},{\"mobile\":\"15234878930\"},{\"endTime\":\"1618308905000\"},{\"content\":\"问诊已开始，请及时沟通\"},{\"chargesListId\":\"5801\"}]","attach":"{\"customExts\":[{\"visitTime\":\"1618298105000\"},{\"status\":\"2\"},{\"relevantDate\":\"\"},{\"mobile\":\"15234878930\"},{\"endTime\":\"1618308905000\"},{\"content\":\"问诊已开始，请及时沟通\"},{\"chargesListId\":\"5801\"}],\"customEvent\":\"received\",\"type\":\"custom\"}","ext":"{\"inquiringPatientId\":73,\"chargesListId\":5801,\"patientId\":117275227127809,\"doctorId\":266,\"extType\":\"charges\"}"},{"msgId":"862143698350114884","fromAccount":"user_hospital_117275227127809","toAccount":"doctor_266","msgType":"txt","chargesListId":5801,"sendTime":"2021-04-13 15:17:52","content":"大大大","fileUrl":null,"customEvent":null,"customExt":null,"attach":null,"ext":"{\"inquiringPatientId\":73,\"chargesListId\":5801,\"patientId\":117275227127809,\"doctorId\":266,\"extType\":\"charges\"}"},{"msgId":"862189369425922196","fromAccount":"doctor_266","toAccount":"user_hospital_117275227127809","msgType":"custom","chargesListId":5801,"sendTime":"2021-04-13 18:15:05","content":null,"fileUrl":null,"customEvent":"finish","customExt":"[{\"visitTime\":\"1618298105000\"},{\"status\":\"3\"},{\"endTime\":\"1618308906000\"},{\"content\":\"问诊已结束\"},{\"chargesListId\":\"5801\"}]","attach":"{\"customExts\":[{\"visitTime\":\"1618298105000\"},{\"status\":\"3\"},{\"endTime\":\"1618308906000\"},{\"content\":\"问诊已结束\"},{\"chargesListId\":\"5801\"}],\"customEvent\":\"finish\",\"type\":\"custom\"}","ext":"{\"inquiringPatientId\":73,\"chargesListId\":5801,\"patientId\":117275227127809,\"doctorId\":266,\"extType\":\"charges\"}"},{"msgId":"862189369958598812","fromAccount":"doctor_266","toAccount":"user_hospital_117275227127809","msgType":"custom","chargesListId":5801,"sendTime":"2021-04-13 18:15:05","content":null,"fileUrl":null,"customEvent":"to_evaluate","customExt":"[{\"status\":\"3\"},{\"endTime\":\"1618308906000\"},{\"content\":\"您的感谢和评价是对我最大的认可\"},{\"chargesListId\":\"5801\"}]","attach":"{\"customExts\":[{\"status\":\"3\"},{\"endTime\":\"1618308906000\"},{\"content\":\"您的感谢和评价是对我最大的认可\"},{\"chargesListId\":\"5801\"}],\"customEvent\":\"to_evaluate\",\"type\":\"custom\"}","ext":"{\"inquiringPatientId\":73,\"chargesListId\":5801,\"patientId\":117275227127809,\"doctorId\":266,\"extType\":\"charges\"}"}]
     */

    private boolean result;
    private String msg;
    /**
     * msgId : 862142542299267208
     * fromAccount : user_hospital_117275227127809
     * toAccount : doctor_266
     * msgType : custom
     * chargesListId : 5801
     * sendTime : 2021-04-13 15:13:23
     * content : null
     * fileUrl : null
     * customEvent : chargesList
     * customExt : [{"patientName":"香蕉"},{"inquiringPatientId":"73"},{"gender":"男"},{"createTime":"2021-04-13 15:13:22"},{"chiefComplaint":"明科夫斯基-消法尔综合征[Minkowski-Chauffard综合征],肾上腺脑白质营养不良[Addison-Schilder综合征]"},{"chargesListId":"5801"},{"age":"10岁"}]
     * attach : {"customExts":[{"patientName":"香蕉"},{"inquiringPatientId":"73"},{"gender":"男"},{"createTime":"2021-04-13 15:13:22"},{"chiefComplaint":"明科夫斯基-消法尔综合征[Minkowski-Chauffard综合征],肾上腺脑白质营养不良[Addison-Schilder综合征]"},{"chargesListId":"5801"},{"age":"10岁"}],"customEvent":"chargesList","type":"custom"}
     * ext : {"inquiringPatientId":73,"chargesListId":5801,"patientId":117275227127809,"doctorId":266,"extType":"charges"}
     */

    private List<DataBean> data;

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements MultiItemEntity {
        private String imTeamId;
        private String msgId;
        private String fromAccount;
        private String toAccount;
        private String msgType;
        private int chargesListId;
        private String sendTime;
        private String content;
        private String fileUrl;
        private String customEvent;
        private String customExt;
        private String attach;
        private String ext;
        private EMMessage emMessage;
        private String selfAvator;
        private String fromAvator;
        private int type;
        private EMMessage.ChatType chatType;
        private boolean showTime;


        public boolean isShowTime() {
            return showTime;
        }

        public void setShowTime(boolean showTime) {
            this.showTime = showTime;
        }

        public EMMessage.ChatType getChatType() {
            return chatType;
        }

        public void setChatType(EMMessage.ChatType chatType) {
            this.chatType = chatType;
        }

        public String getImTeamId() {
            return imTeamId;
        }

        public void setImTeamId(String imTeamId) {
            this.imTeamId = imTeamId;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getFromAvator() {
            return fromAvator;
        }

        public void setFromAvator(String fromAvator) {
            this.fromAvator = fromAvator;
        }

        public String getSelfAvator() {
            return selfAvator;
        }

        public void setSelfAvator(String selfAvator) {
            this.selfAvator = selfAvator;
        }

        public EMMessage getEmMessage() {
            return emMessage;
        }

        public void setEmMessage(EMMessage emMessage) {
            this.emMessage = emMessage;
        }

        public String getMsgId() {
            return msgId;
        }

        public void setMsgId(String msgId) {
            this.msgId = msgId;
        }

        public String getFromAccount() {
            return fromAccount;
        }

        public void setFromAccount(String fromAccount) {
            this.fromAccount = fromAccount;
        }

        public String getToAccount() {
            return toAccount;
        }

        public void setToAccount(String toAccount) {
            this.toAccount = toAccount;
        }

        public String getMsgType() {
            return msgType;
        }

        public void setMsgType(String msgType) {
            this.msgType = msgType;
        }

        public int getChargesListId() {
            return chargesListId;
        }

        public void setChargesListId(int chargesListId) {
            this.chargesListId = chargesListId;
        }

        public String getSendTime() {
            return sendTime;
        }

        public void setSendTime(String sendTime) {
            this.sendTime = sendTime;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getFileUrl() {
            return fileUrl;
        }

        public void setFileUrl(String fileUrl) {
            this.fileUrl = fileUrl;
        }

        public String getCustomEvent() {
            return customEvent;
        }

        public void setCustomEvent(String customEvent) {
            this.customEvent = customEvent;
        }

        public String getCustomExt() {
            return customExt;
        }

        public void setCustomExt(String customExt) {
            this.customExt = customExt;
        }

        public String getAttach() {
            return attach;
        }

        public void setAttach(String attach) {
            this.attach = attach;
        }

        public String getExt() {
            return ext;
        }

        public void setExt(String ext) {
            this.ext = ext;
        }

        @Override
        public int getItemType() {


//                if ("custom".equals(this.msgType)) {
//                    //问诊单
//                    if ("chargesList".equals(this.customEvent)) {
//                        if (string.equals(this.toAccount)) {
//                            return 7001;
//                        } else {
//                            return 7002;
//                        }
//                    }
//
//                }
//            }
            return type;
        }
    }
}
